<?php

ini_set("display_errors","1");
ini_set("display_startup_errors","1");
include_once("include/dbcommon.php");
include_once("include/header.php");


if(!@$_SESSION["UserID"])
{ 
	$_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"];
	header("Location: login.php?message=expired"); 
	return;
}

//print_r ($_SESSION);

$conn=db_connect();




			if($_SESSION["grupo"]=="-1"){
			include"pagina_inicial_administrador.php";
			}
			else if($_SESSION["grupo"]=="1"){
			include"pagina_inicial_regional.php";
			}
			else if($_SESSION["grupo"]=="2"){
			include"pagina_inicial_sede.php";
			
			}else if($_SESSION["grupo"]=="3"){
			include"pagina_inicial_gerente.php";
			}

include_once("include/footer.php");
